<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
      <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%" >
          <input type="hidden" name="stid" id="stid"  value="${data.stid}"/>
	     	<tr>
				<td class="table-header" colspan="4">社团申请信息</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">社团姓名:</td>
				<td class="table-contentTD" style="width: 35%">${data.stmc}</td>
				</td>
		
		        <td class="table-titleTD" style="width: 15%">成立时间:</td>
				<td class="table-contentTD">${data.clsj}</td>
			</tr>
	     <tr>
			    <td class="table-titleTD" style="width: 15%">状态：</td>
				<td class="table-contentTD">
				<c:if test="${data.states==0}">未提交</c:if>
				<c:if test="${data.states==1}">审核退回</c:if>
				<c:if test="${data.states==2}">审核中</c:if>
				<c:if test="${data.states==3}">审核通过</c:if>
				<c:if test="${data.states==8}">退回并结束</c:if>
				<c:if test="${data.states==9}">撤回</c:if>
				</td>
				
                <td class="table-titleTD" style="width: 15%">发起人:</td>
				<td class="table-contentTD" >${data.fqrxm}</td>
			</tr>
		  <tr>
			    <td class="table-titleTD" style="width: 15%">社长:</td>
				<td class="table-contentTD">${data.szxm}</td>
				
			    <td class="table-titleTD" style="width: 15%">指导老师:</td>
				<td class="table-contentTD">${data.zdlsxm}</td>
			</tr>
			
			<tr>
			    <td class="table-titleTD" style="width: 15%">申请人:</td>
			    <td class="table-contentTD">${data.creatorname}</td>
			    <td class="table-titleTD" style="width: 15%">申请日期:</td>
			    <td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd HH:mm"/></td>
			</tr>
		   
			<tr>
				<td class="table-titleTD" style="width: 15%">现有人员与岗位配置:</td>
				<td class="table-contentTD" colspan="3">${data.rygw}</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">服务宗旨:</td>
				<td class="table-contentTD" colspan="3">${data.fwzz}</td>
			</tr>
            <tr>
				<td class="table-titleTD" style="width: 15%">学年计划:</td>
				<td class="table-contentTD" colspan="3">${data.xnjh}</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">规章制度:</td>
				<td class="table-contentTD" colspan="3" >${data.gzzd}</td>
			</tr>			
		</table>
		</form>
		<br />
		
		<br/>
		<c:if test="${data.states!=0}">
		<table cellpadding="0" cellspacing="0" border="0" class="table-border"
			width="95%">
			<tr>
				<td class="table-header" colspan="6">审批结果</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="text-align: center;">序号</td>
				<td class="table-titleTD" style="text-align: center;">审批人</td>
				<td class="table-titleTD"  style="text-align: center;">审批步骤</td>
				<td class="table-titleTD" style="text-align: center;">审批结果</td>
				<td class="table-titleTD" style="text-align: center;">审批时间</td>
				<td class="table-titleTD" style="text-align: center;">审批意见</td>
			</tr>
			<c:forEach items="${chekResultList}" var="res" varStatus="status">
			<tr>
				<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userName}</td>
				<td class="table-contentTD"  style="text-align: center;">${res.stepName}</td>
				<td class="table-contentTD" style="text-align: center;">${res.userState}</td>
				<td class="table-contentTD" style="text-align: center;">${res.approvalTime}</td>
				<td class="table-contentTD" style="text-align: center;">${res.comments}</td>
			</tr>
			</c:forEach>
			</table>
		</c:if>
		<br />
		<br />
			
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <c:if test="${data.states==0 or data.states==1}">
			            <td><input type="button" id="btnSubmit" class="inputButton" style="text-align: center;" value="提交" autocomplete="off"  /></td>
			            <td><input type="button" id="btnSave" class="inputButton" style="text-align: center;" value="修改" autocomplete="off"   /></td>
				</c:if>
				<td><input type="button" id="returnBut"  class="inputButton" value="返回"  style="text-align: center;" autocomplete="off"  /></td>
			</tr>
		</table>
		<script>
			$(document).ready(function() {
				  $("#btnSave").click(function() {
					   window.location.href ="${basePath}/twglStudentCorporation/updateToview?id="+ $("#stid").val();
		 		  });
				  
				    //提交
			  		$("#btnSubmit")
							.click(
									function() {
									 layer.confirm("您是否确定提交吗?",{icon : 3,title : '提示',skin : 'layer-ext-moon'
										},function(index) {
											document.Form.action = "${basePath}/twglStudentCorporation/btnSubmit?id="+ $("#stid").val();
											document.Form.submit();	 	 
									  },function(index) {
										  layer.close(index);
										});	
									});
				
				  
				  $("#returnBut").click(function() {
		 			 window.location.href='${basePath}/twglStudentCorporation/index';
		 		  });
			});
			
			
	</script>
</body>
</html>
